/*
 * @Author: your name
 * @Date: 2020-11-19 20:25:05
 * @LastEditTime: 2020-12-01 22:01:48
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \wechat-server\start.js
 */
import Koa from "koa";
import router from "./routes";
import hotListTimer from "./utils/hotListTimer";
import helmet from "koa-helmet"; // 安全相关
import cors from "@koa/cors";
const app = new Koa();

// app.use(hotListTimer.routes()); /*启动路由*/
// app.use(hotListTimer.allowedMethods());
hotListTimer();
app.use(router.routes());
app.use(router.allowedMethods());
app.use(cors());
app.use(helmet());
app.listen(3001);
